package com.lancoo.cvas.mapper;

import com.lancoo.cvas.config.MybatisRedisCache;
import com.lancoo.cvas.entity.Room;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lancoo.cvas.pojo.dto.ArrangeRoomDto;
import com.lancoo.cvas.pojo.vo.AllScheduleVo;
import com.lancoo.cvas.pojo.vo.Campus;
import com.lancoo.cvas.pojo.vo.RoomDto;
import org.apache.ibatis.annotations.CacheNamespace;

import java.util.List;

/**
 * 教室
 *
 * @author liufeng
 * @email 1037383243@qq.com
 * @date 2023-12-04 11:54:00
 */
//@CacheNamespace(implementation = MybatisRedisCache.class, eviction = MybatisRedisCache.class)
public interface RoomMapper extends BaseMapper<Room> {

    //批量插入教室
    int addBatch(List<Room> rooms);

    List<Campus> getCampusList(String schoolId, String term);

    List<ArrangeRoomDto> getArrangeRoom(String schoolId, String term, String campusId, int deleted);

    List<Room> getBuildingList(String schoolId, String term, String campusId);

    List<Room> getRoomListByBuilding(Integer buildingId, String schoolId, String term, String campusId);

    List<AllScheduleVo> getRoomNameForSchedule(String schoolId, String term, int deleted);

    /**
     * 通过学校学期获取教室
     *
     * @param schoolId
     * @param term
     * @return
     */
    List<Room> selectRoomList(String schoolId, String term);


    List<RoomDto> getRoomWithClassInfo(String schoolId, String term, String campusId);

    List<Integer> selectRoomIds(String schoolId, String term);
}
